<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fregments :: head(~{::title})">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Main CSS-->

    <link rel="stylesheet" type="text/css" href="../static/css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" href="../static/css/bootstrap-icons.min.css">
    <title>后台登录</title>
</head>
<body>
<section class="material-half-bg">
    <div class="cover"></div>
</section>

<section class="login-content">
    <div class="logo">
        <h1>挚夕影院</h1>
    </div>

    <div class="login-box">
        <form class="login-form" th:action="@{/login.do}" method="post">
            <h3 class="login-head"><i class="bi bi-person me-2"></i>登录</h3>
            <div class="mb-3">
                <label class="form-label">用户名</label>
                <input class="form-control" name="username" type="text" placeholder="username" autofocus>
            </div>
            <div class="mb-3">
                <label class="form-label">密码</label>
                <input class="form-control" name="password" type="password" placeholder="password">
            </div>
            <div class="mb-3">
                <div class="utility">
                    <div class="form-check">
                        <label class="form-check-label">
                            <input class="form-check-input" name="remember" type="checkbox"><span class="label-text">记住我</span>
                        </label>
                    </div>
                    <p class="semibold-text mb-2"><a href="#" data-toggle="flip">忘记密码？</a></p>
                </div>

            </div>
            <div class="mb-3 btn-container d-grid">
                <button class="btn btn-primary btn-block"><i class="bi bi-box-arrow-in-right me-2 fs-5"></i>登录
                </button>

            </div>
            <div th:unless="${#strings.isEmpty(msg)}" class="alert alert-danger alert-dismissible fade show" role="alert">
                <strong>登录失败!</strong> &nbsp;
                <span th:text="${msg}">用户名或密码错误</span>
                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
        </form>
        <form class="forget-form" action="index.html">
            <h3 class="login-head"><i class="bi bi-person-lock me-2"></i>忘记密码?</h3>
            <div class="mb-3">
                <label class="form-label">邮箱</label>
                <input class="form-control" type="text" placeholder="Email">
            </div>
            <div class="mb-3 btn-container d-grid">
                <button class="btn btn-primary btn-block"><i class="bi bi-unlock me-2 fs-5"></i>重置</button>
            </div>
            <div class="mb-3 mt-3">
                <p class="semibold-text mb-0"><a href="#" data-toggle="flip"><i class="bi bi-chevron-left me-1"></i>返回登录</a>
                </p>
            </div>
        </form>
    </div>

</section>
<!--/*/<th:block th:replace="_fregments::script">/*/-->
<script src="../static/js/jquery-3.7.0.min.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/main.js"></script>
<!--/*/</th:block>/*/-->

<script type="text/javascript">
    // Login Page Flipbox control
    $('.login-content [data-toggle="flip"]').click(function () {
        $('.login-box').toggleClass('flipped');
        return false;
    });
</script>
</body>
</html>